package com.alinesno.cloud.gateway.core.dispather.mina.bean;

import java.util.Date;

/**
 * 服务实体
 * 
 * @author WeiXiaoJin
 * @since 2019年9月21日 下午11:43:30
 */
public class BusinessServerBean {

	private String serverId ; // 服务ID
	private String serviceIp = "0.0.0.0";
	private int serverPort = 18080;
	private String businessCode; // 服务代码
	private String businessDesc; // 服务描述

	private String encoder; // 自定义编码器
	private String decoder; // 自定义解码器
	
	private String accessIp; // 允许的IP(以,作为分隔符)
	private String denyIp; // 限制IP(以,作为分隔符)
	private boolean hasOpen = true ; // 是否打开
	private boolean hasHystrix; // 是否打开(熔断信息)
	private String hystrixContent; // 熔断器(用于错误的时候显示)
	private int limitRequest = -1; // 限流(-1表示不限流)
	private boolean hasEncryption = false; // 是否加密(默认不加密)
	private String encType; // 加密方式
	private String decodeStr; // 解密代码
	private int clientOuttime; // 客户端接口超时时间
	private int serverOuttime; // 服务端超时时间
	private String authType; // 认证方式
	private Date openTime; // 开始访问时间
	private Date closeTime; // 禁止关闭时间
	private int retrics = 1; // 重试次数(默认为1次)
	private String globalHeader; // 全局头部(比如设置header)
	private int requestCount; // 访问次数
	private int hasRequestCount ; // 已访问次数
	private String forwardUrl; // 转发目标
	private String forwardType; // 转发类型(HTTP/SOCKET)
	private String forwardIp; // 转发IP
	private Integer forwardPort; // 转发Port
	private String businessServerId; // 服务Id

	public String getAccessIp() {
		return accessIp;
	}

	public void setAccessIp(String accessIp) {
		this.accessIp = accessIp;
	}

	public String getDenyIp() {
		return denyIp;
	}

	public void setDenyIp(String denyIp) {
		this.denyIp = denyIp;
	}

	public boolean isHasOpen() {
		return hasOpen;
	}

	public void setHasOpen(boolean hasOpen) {
		this.hasOpen = hasOpen;
	}

	public boolean isHasHystrix() {
		return hasHystrix;
	}

	public void setHasHystrix(boolean hasHystrix) {
		this.hasHystrix = hasHystrix;
	}

	public String getHystrixContent() {
		return hystrixContent;
	}

	public void setHystrixContent(String hystrixContent) {
		this.hystrixContent = hystrixContent;
	}

	public int getLimitRequest() {
		return limitRequest;
	}

	public void setLimitRequest(int limitRequest) {
		this.limitRequest = limitRequest;
	}

	public boolean isHasEncryption() {
		return hasEncryption;
	}

	public void setHasEncryption(boolean hasEncryption) {
		this.hasEncryption = hasEncryption;
	}

	public String getEncType() {
		return encType;
	}

	public void setEncType(String encType) {
		this.encType = encType;
	}

	public String getDecodeStr() {
		return decodeStr;
	}

	public void setDecodeStr(String decodeStr) {
		this.decodeStr = decodeStr;
	}

	public int getClientOuttime() {
		return clientOuttime;
	}

	public void setClientOuttime(int clientOuttime) {
		this.clientOuttime = clientOuttime;
	}

	public int getServerOuttime() {
		return serverOuttime;
	}

	public void setServerOuttime(int serverOuttime) {
		this.serverOuttime = serverOuttime;
	}

	public String getAuthType() {
		return authType;
	}

	public void setAuthType(String authType) {
		this.authType = authType;
	}

	public Date getOpenTime() {
		return openTime;
	}

	public void setOpenTime(Date openTime) {
		this.openTime = openTime;
	}

	public Date getCloseTime() {
		return closeTime;
	}

	public void setCloseTime(Date closeTime) {
		this.closeTime = closeTime;
	}

	public int getRetrics() {
		return retrics;
	}

	public void setRetrics(int retrics) {
		this.retrics = retrics;
	}

	public String getGlobalHeader() {
		return globalHeader;
	}

	public void setGlobalHeader(String globalHeader) {
		this.globalHeader = globalHeader;
	}

	public int getRequestCount() {
		return requestCount;
	}

	public void setRequestCount(int requestCount) {
		this.requestCount = requestCount;
	}

	public int getHasRequestCount() {
		return hasRequestCount;
	}

	public void setHasRequestCount(int hasRequestCount) {
		this.hasRequestCount = hasRequestCount;
	}

	public String getForwardUrl() {
		return forwardUrl;
	}

	public void setForwardUrl(String forwardUrl) {
		this.forwardUrl = forwardUrl;
	}

	public String getForwardType() {
		return forwardType;
	}

	public void setForwardType(String forwardType) {
		this.forwardType = forwardType;
	}

	public String getForwardIp() {
		return forwardIp;
	}

	public void setForwardIp(String forwardIp) {
		this.forwardIp = forwardIp;
	}

	public Integer getForwardPort() {
		return forwardPort;
	}

	public void setForwardPort(Integer forwardPort) {
		this.forwardPort = forwardPort;
	}

	public String getBusinessServerId() {
		return businessServerId;
	}

	public void setBusinessServerId(String businessServerId) {
		this.businessServerId = businessServerId;
	}

	public String getServerId() {
		return serverId;
	}

	public void setServerId(String serverId) {
		this.serverId = serverId;
	}

	public String getEncoder() {
		return encoder;
	}

	public void setEncoder(String encoder) {
		this.encoder = encoder;
	}

	public String getDecoder() {
		return decoder;
	}

	public void setDecoder(String decoder) {
		this.decoder = decoder;
	}

	public String getBusinessDesc() {
		return businessDesc;
	}

	public void setBusinessDesc(String businessDesc) {
		this.businessDesc = businessDesc;
	}

	public String getServiceIp() {
		return serviceIp;
	}

	public void setServiceIp(String serviceIp) {
		this.serviceIp = serviceIp;
	}

	public int getServerPort() {
		return serverPort;
	}

	public void setServerPort(int serverPort) {
		this.serverPort = serverPort;
	}

	public String getBusinessCode() {
		return businessCode;
	}

	public void setBusinessCode(String businessCode) {
		this.businessCode = businessCode;
	}
}
